#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (ll i = (a); i <= (b); i++)
#define per(i, a, b) for (ll i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e4 + 5;
const int D = 550;

ll n;
int m, a, b;
ll L[N], R[N];
int cnt;
bool bad[N * D];
bool dp[N * D];

bool solve() {
  rep(i, 1, m) if (R[i] + 1 - L[i] >= b) return false;
  if (a == b) {
    if ((n - 1) % b) return false;
    rep(i, 1, m) {
      ll x = L[i] - 1, y = R[i] - 1;
      x = (x + b - 1) / b * b;
      if (x <= y) return false;
    }
    return true;
  } else {
    cnt = 0;
    ll mxd = a * b;
    rep(i, 1, m) {
      rep(j, 1, min(mxd, L[i] - 1 - R[i - 1])) bad[++cnt] = 0;
      rep(j, 1, R[i] + 1 - L[i]) bad[++cnt] = 1;
    }
    rep(j, 1, min(mxd, n - R[m])) bad[++cnt] = 0;

    dp[1] = 1;
    rep(i, 1, cnt) {
      if (!dp[i]) continue;
      rep(j, a, b) dp[i + j] = !bad[i + j];
    }
    return dp[cnt];
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> a >> b;
  rep(i, 1, m) cin >> L[i] >> R[i];
  bool res = solve();
  cout << (res ? "Yes" : "No");
  return 0;
}